/**
 * @file lv_log_file.h
 * @brief LVGL log to file functionality
 */

#ifndef LV_LOG_FILE_H
#define LV_LOG_FILE_H

#ifdef __cplusplus
extern "C" {
#endif

/*********************
 *      INCLUDES
 *********************/
#include "lv_log.h"

#if LV_USE_LOG

/**********************
 * GLOBAL PROTOTYPES
 **********************/

/**
 * Initialize the log-to-file functionality.
 * This function registers a callback to save LVGL logs to a file.
 * The log file will be created in the current directory as "lvgl.log".
 */
void lv_log_file_init(void);

/**
 * Close the log file and add a timestamp.
 * It's recommended to call this function before exiting the application
 * to ensure all logs are properly saved.
 */
void lv_log_file_close(void);

#endif /*LV_USE_LOG*/

#ifdef __cplusplus
} /*extern "C"*/
#endif

#endif /*LV_LOG_FILE_H*/